package com.wxzl.community.common.utils.ext

import android.content.Intent
import android.net.Uri
import androidx.fragment.app.Fragment


/**
 * Created by xiaojianjun on 2019-11-21.
 */

fun Fragment.openInExplorer(link: String?) {
    link?.let {
        startActivity(Intent().apply {
            action = Intent.ACTION_VIEW
            data = Uri.parse(it)
        })
    }

}



//fun Fragment.initImmersiveStatusBarWhitImage(drawable: Int) {
//
//    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
//        val decorView: View = requireActivity().window.decorView
//        val option = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
//        decorView.systemUiVisibility = option
//    } else {
//        requireActivity().window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
//    }
//
//    ImmersionBar.with(this).statusBarDarkFont(false).fitsSystemWindows(true).
//
//
//}
